package cn.tedu.pojo;


import org.springframework.stereotype.Component;

@Component //spring 框架提供，用来ioc
public class Car {
    //作为Model层，提供一些属性
    private String name;
    private String color;
    private double price;

    public Car() { }
    public Car(String name, String color, double price) {
        this.name = name;
        this.color = color;
        this.price = price;
    }

    public String getName() { return name; }
    public void setName(String name) { this.name = name; }

    public String getColor() { return color; }
    public void setColor(String color) { this.color = color; }

    public double getPrice() { return price; }
    public void setPrice(double price) { this.price = price; }


    @Override
    public String toString() {
        return "Car{" +
                "name='" + name + '\'' +
                ", color='" + color + '\'' +
                ", price=" + price +
                '}';
    }
}
